package a.f.n;

import a.c.d;
import a.c.e;
import a.d.w;
import a.f.cd;
import a.f.o;
import a.f.zb;
import a.f.zc;

public class x
  implements hb
{
  public static final byte a = 1;
  public static final byte b = 2;
  public static final byte c = 3;
  public static final byte d = 4;
  public static final byte e = 5;
  public static final byte f = 0;
  private byte g;
  private double h;
  private boolean i;
  public static int j;
  
  public x()
  {
    this((byte)0, 0.5D);
  }
  
  public x(byte paramByte)
  {
    this(paramByte, 0.5D);
  }
  
  public x(byte paramByte, double paramDouble)
  {
    this.g = paramByte;
    this.h = paramDouble;
    this.i = false;
  }
  
  public void a(o paramo, e parame)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    if (parame.i() != null) {
      a(paramo, parame, parame.i());
    }
    int k = 0;
    d locald = parame.h();
    do
    {
      while (!bool1)
      {
        if (locald == null) {
          break;
        }
        a(paramo, parame, locald, k);
        locald = locald.i();
        k++;
      }
    } while (bool2);
  }
  
  protected void a(o paramo, e parame, d paramd)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    zb localzb = paramo.e(paramd);
    if (!bool2)
    {
      switch (this.g)
      {
      case 0: 
      default: 
        localzb.b(w.c);
        if (!bool1) {
          break;
        }
      }
    }
    else
    {
      cd localcd = a(paramo, paramd);
      if ((bool2) || ((localcd == null) || ((bool2) || (!localcd.a()))))
      {
        if ((bool2) || (localcd != null))
        {
          if (!bool2) {
            if (!localcd.g()) {
              break label139;
            }
          }
        }
        else {
          localzb.b(w.c);
        }
        if (bool1)
        {
          label139:
          zc localzc = paramo.d(parame);
          if (!bool2) {
            if (localcd.c())
            {
              localzb.b(new w(0.0D, -localzc.d() * 0.5D));
              if ((!bool2) && (!bool1)) {
                return;
              }
            }
          }
          if (!bool2) {
            if (localcd.e())
            {
              localzb.b(new w(localzc.c() * 0.5D, 0.0D));
              if ((!bool2) && (!bool1)) {
                return;
              }
            }
          }
          if (!bool2)
          {
            if (localcd.d())
            {
              if (bool2) {
                break label316;
              }
              localzb.b(new w(0.0D, localzc.d() * 0.5D));
            }
          }
          else if (!bool1) {
            return;
          }
          label316:
          localzb.b(new w(-localzc.c() * 0.5D, 0.0D));
        }
      }
    }
  }
  
  protected void a(o paramo, e parame, d paramd, int paramInt)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    zb localzb = paramo.e(paramd);
    zc localzc = paramo.d(parame);
    double d1 = localzc.c();
    double d2 = localzc.d();
    int k = parame.e();
    if (!bool2) {}
    int m = this.i ? -1 : 1;
    if (!bool2) {}
    double d3;
    double d4;
    switch (this.g)
    {
    case 2: 
      d3 = a(d1, k);
      d4 = a(d1, k, d3);
      localzb.a(new w(m * (d3 + paramInt * d4 - d1 / 2.0D), -d2 / 2.0D));
      return;
    case 3: 
      d3 = a(d1, k);
      d4 = a(d1, k, d3);
      localzb.a(new w(m * (d3 + paramInt * d4 - d1 / 2.0D), d2 / 2.0D));
      return;
    case 4: 
      d3 = a(d2, k);
      d4 = a(d2, k, d3);
      localzb.a(new w(d1 / 2.0D, m * (d3 + paramInt * d4 - d2 / 2.0D)));
      return;
    case 5: 
      d3 = a(d2, k);
      d4 = a(d2, k, d3);
      localzb.a(new w(-d1 / 2.0D, m * (d3 + paramInt * d4 - d2 / 2.0D)));
      return;
    case 0: 
      localzb.a(w.c);
      return;
    case 1: 
      cd localcd = a(paramo, paramd, paramInt);
      if ((bool2) || ((localcd == null) || ((bool2) || (!localcd.a()))))
      {
        if ((bool2) || (localcd != null))
        {
          if (bool2) {
            break label465;
          }
          if (!localcd.g()) {}
        }
        else
        {
          localzb.a(w.c);
          if ((!bool2) && (!bool1)) {
            break label635;
          }
        }
        label465:
        if (!bool2) {
          if (localcd.c())
          {
            localzb.a(new w(0.0D, -localzc.d() * 0.5D));
            if ((!bool2) && (!bool1)) {
              break label635;
            }
          }
        }
        if (!bool2) {
          if (localcd.e())
          {
            localzb.a(new w(localzc.c() * 0.5D, 0.0D));
            if ((!bool2) && (!bool1)) {
              break label635;
            }
          }
        }
        if (!bool2)
        {
          if (localcd.d())
          {
            if (bool2) {
              break label630;
            }
            localzb.a(new w(0.0D, localzc.d() * 0.5D));
          }
        }
        else {
          if (!bool1) {
            break label635;
          }
        }
        label630:
        localzb.a(new w(-localzc.c() * 0.5D, 0.0D));
        label635:
        return;
      }
      break;
    }
  }
  
  protected double a(double paramDouble, int paramInt)
  {
    if (paramInt <= 1) {
      return paramDouble * 0.5D;
    }
    return this.h * (paramDouble / (paramInt - 1 + 2.0D * this.h));
  }
  
  protected double a(double paramDouble1, int paramInt, double paramDouble2)
  {
    if (paramInt <= 1) {
      return 0.0D;
    }
    return (paramDouble1 - 2.0D * paramDouble2) / (paramInt - 1);
  }
  
  protected cd a(o paramo, d paramd, int paramInt)
  {
    return cd.d(paramo, paramd);
  }
  
  protected cd a(o paramo, d paramd)
  {
    return cd.e(paramo, paramd);
  }
  
  public byte a()
  {
    return this.g;
  }
  
  public void a(byte paramByte)
  {
    this.g = paramByte;
  }
  
  public double b()
  {
    return this.h;
  }
  
  public void a(double paramDouble)
  {
    this.h = paramDouble;
  }
  
  public boolean c()
  {
    return this.i;
  }
  
  public void a(boolean paramBoolean)
  {
    this.i = paramBoolean;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.n.getDefaultLicenseInfoEx

 * JD-Core Version:    0.7.0.1

 */